/*
 * Copyright (c) www.bugull.com
 */

package com.bugull.farm.core.store;

import com.bugull.mongo.SimpleEntity;
import com.bugull.mongo.annotations.Entity;
import java.util.Date;

/**
 * All Device registered to this system.
 * 
 * Just or read, can't delete.
 * 
 * @author Frank Wen(xbwen@hotmail.com)
 */
@Entity
public class Device extends SimpleEntity {
    
    private String macAddress;
    
    private String companyCode;
    private String deviceType;


    private String softVersion;
    /**
     * 授权码
     */
    private String authCode;

    private Date activeTime;
    private boolean online;
    private Date lastOnlineTime;
    private String lastOnlineIp;
    private long totalOnlineTime;
    
    //登陆IP，记录设备登陆是服务的服务器IP地址
    private String loginIp;
    
    private String country;
    private String region;
    private String city;

    public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getRegion() {
		return region;
	}

	public void setRegion(String region) {
		this.region = region;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public long getTotalOnlineTime() {
		return totalOnlineTime;
	}

	public void setTotalOnlineTime(long totalOnlineTime) {
		this.totalOnlineTime = totalOnlineTime;
	}

	public String getMacAddress() {
        return macAddress;
    }

    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getSoftVersion() {
        return softVersion;
    }

    public void setSoftVersion(String softVersion) {
        this.softVersion = softVersion;
    }

    public Date getActiveTime() {
        return activeTime;
    }

    public void setActiveTime(Date activeTime) {
        this.activeTime = activeTime;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public Date getLastOnlineTime() {
        return lastOnlineTime;
    }

    public void setLastOnlineTime(Date lastOnlineTime) {
        this.lastOnlineTime = lastOnlineTime;
    }

    public String getLastOnlineIp() {
        return lastOnlineIp;
    }

    public void setLastOnlineIp(String lastOnlineIp) {
        this.lastOnlineIp = lastOnlineIp;
    }

    public String getAuthCode() {
        return authCode;
    }

    public void setAuthCode(String authCode) {
        this.authCode = authCode;
    }

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}
    
}
